/*
* jlb
*/
package com.jlb.user.entity;

/**
 * 用户购买的矿机 的实体类的状态
 * 状态：工作中 Working，已停机 Stop
 *
 * @author jlb
 */
public enum UserMinerState implements java.io.Serializable {
    Working("工作中"),
    Stop("已停机"),;

    public String val;

    UserMinerState(String val) {
        this.val = val;
    }

    /**
     * 根据状态名称查询状态
     *
     * @param stateName
     * @return
     */
    public static UserMinerState getEnum(String stateName) {
        for (UserMinerState userMinerState : UserMinerState.values()) {
            if (userMinerState.name().equalsIgnoreCase(stateName)) {
                return userMinerState;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return this.name();
    }

}
